/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

/**
 *
 * @author user
 */
public class bai11 {
    public static void main(String[] args) {
        System.out.println(tongUocSo(20,19));
    }
    
    private static int tongUocSo(int n,int x){
        if(x==1) return 1;
        if(n%x==0) return x+tongUocSo(n, x-1);
        return tongUocSo(n, x-1);
    }
}
